Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: convert build_binaries.sh to build_binaries.py #6895

Closed
wants to merge 5 commits into from

Conversation

peterbarker
Copy link
Contributor

No description provided.

@tridge
Copy link
Contributor

tridge commented Sep 4, 2017

great stuff, thanks Peter!

@tridge
Copy link
Contributor

tridge commented Sep 4, 2017

does this generate all the same filenames as the old one?

@tridge
Copy link
Contributor

tridge commented Sep 5, 2017

also need to update Tools/autotest/autotest.py line 83

@peterbarker
Copy link
Contributor Author

@tridge not quite. https://github.com/ArduPilot/ardupilot/blob/master/Tools/scripts/build_binaries.sh#L344 means the old shell script didn't generate some things which it probably should have - this skip_board_waf followed by make I didn't replicate, meaning this generates a couple more binaries.

Apart from that the trees appear identical.

You think I should plumb this in as part of this PR?

@peterbarker
Copy link
Contributor Author

Note that there is a huge amount of cleanup that can still be done in this script.

I have deliberately not made these cleanups - at the moment you can go back to build_binaries.sh and find the equivalent place it see the old .sh functionality.

@peterbarker
Copy link
Contributor Author

(reverse-i-search)`d': time ~/rc/ardupilot/Tools/scripts/build_binaries.py 2>&1 | tee buil^Ctxt
pbarker@bluebottle:~/rc/tmp/ardupilot-2(master)$ tree ../buildlogs >/tmp/x-pypbarker@bluebottle:~/rc/tmp/ardupilot-2(master)$ diff -u /tmp/x-sh /tmp/x-py
--- /tmp/x-sh	2017-09-04 09:41:15.987529888 +1000
+++ /tmp/x-py	2017-09-05 19:37:42.199344351 +1000
@@ -2,7 +2,7 @@
 └── binaries
     ├── AntennaTracker
     │   ├── 2017-09
-    │   │   └── 2017-09-03-08:09
+    │   │   └── 2017-09-05-10:09
     │   │       ├── navio
     │   │       │   ├── antennatracker
     │   │       │   ├── firmware-version.txt
@@ -71,7 +71,7 @@
     │           └── git-version.txt
     ├── Copter
     │   ├── 2017-09
-    │   │   └── 2017-09-03-08:09
+    │   │   └── 2017-09-05-10:09
     │   │       ├── aerofc-v1
     │   │       │   ├── arducopter.px4
     │   │       │   ├── firmware-version.txt
@@ -327,10 +327,11 @@
     │           ├── arducopter-heli
     │           ├── firmware-version.txt
     │           └── git-version.txt
-    ├── manifest.json.new
+    ├── manifest.json
+    ├── manifest.json.gz
     ├── Plane
     │   ├── 2017-09
-    │   │   └── 2017-09-03-08:09
+    │   │   └── 2017-09-05-10:09
     │   │       ├── disco
     │   │       │   ├── arduplane
     │   │       │   ├── firmware-version.txt
@@ -464,7 +465,7 @@
     │           └── git-version.txt
     ├── Rover
     │   ├── 2017-09
-    │   │   └── 2017-09-03-08:09
+    │   │   └── 2017-09-05-10:09
     │   │       ├── erlebrain2
     │   │       │   ├── ardurover
     │   │       │   ├── firmware-version.txt
@@ -552,6 +553,12 @@
     │   │       ├── firmware-version.txt
     │   │       └── git-version.txt
     │   └── stable
+    │       ├── apm1
+    │       │   ├── APMrover2.hex
+    │       │   └── git-version.txt
+    │       ├── apm2
+    │       │   ├── APMrover2.hex
+    │       │   └── git-version.txt
     │       ├── erlebrain2
     │       │   ├── ardurover
     │       │   ├── firmware-version.txt
@@ -581,7 +588,7 @@
     │           └── git-version.txt
     └── Sub
         ├── 2017-09
-        │   └── 2017-09-03-08:09
+        │   └── 2017-09-05-10:09
         │       ├── erlebrain2
         │       │   ├── ardusub
         │       │   ├── firmware-version.txt
@@ -696,4 +703,4 @@
                 ├── firmware-version.txt
                 └── git-version.txt
 
-176 directories, 520 files
+178 directories, 525 files
pbarker@bluebottle:~/rc/tmp/ardupilot-2(master)$ 
pbarker@bluebottle:~/rc/tmp/buildlogs-sh$ find . -type f | xargs file | perl -pe 's%2017-09/2017-09-03-08:09%%' | perl -pe 's%2017-09/2017-09-05-10:09%%' | grep -v text >/tmp/file-sh
pbarker@bluebottle:~/rc/tmp/buildlogs-sh$ cd -
/home/pbarker/rc/tmp/buildlogs
pbarker@bluebottle:~/rc/tmp/buildlogs$ find . -type f | xargs file | perl -pe 's%2017-09/2017-09-03-08:09%%' | perl -pe 's%2017-09/2017-09-05-10:09%%' | grep -v text >/tmp/file-py
pbarker@bluebottle:~/rc/tmp/buildlogs$ diff -u /tmp/file-sh /tmp/file-py
--- /tmp/file-sh	2017-09-05 19:44:17.809200800 +1000
+++ /tmp/file-py	2017-09-05 19:44:30.549124192 +1000
@@ -22,6 +22,7 @@
 ./binaries/Plane/latest/pxfmini/arduplane:                                       ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=a5ec5bb67f0c77b7e1a122fa561b00d3c240ba56, not stripped
 ./binaries/Plane/latest/disco/arduplane:                                         ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=b5110bc311b36b43ef912c2ce1729dff80dc70a7, not stripped
 ./binaries/Plane/latest/navio2/arduplane:                                        ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=101a64d875b1cfe82fe1e638c340e4659c98d240, not stripped
+./binaries/manifest.json.gz:                                                     zlib compressed data
 ./binaries/Rover/stable/navio/ardurover:                                         ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=42f95152e77f7d8897cc4062414584398f60dd10, not stripped
 ./binaries/Rover/stable/erlebrain2/ardurover:                                    ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=d6012f8ee0f0d60b856ddf4a81f917dcb34e06f9, not stripped
 ./binaries/Rover/stable/pxf/ardurover:                                           ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=bb5deb41a64273ccef68764ae3dec4395251a1d9, not stripped
@@ -50,7 +51,6 @@
 ./binaries/AntennaTracker//navio2/antennatracker:        ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=8acc5a43d9f08439e324ee2cd52763e59385c470, not stripped
 ./binaries/AntennaTracker/latest/navio/antennatracker:                           ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=f4735fda9f41f5337e642b12fe41d3a73d094261, not stripped
 ./binaries/AntennaTracker/latest/navio2/antennatracker:                          ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=8acc5a43d9f08439e324ee2cd52763e59385c470, not stripped
-./binaries/manifest.json.new:                                                    empty
 ./binaries/Sub/stable/navio/ardusub:                                             ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=001f2813ce2c3d9e29803219f7d59ad8c772dda8, not stripped
 ./binaries/Sub/stable/erlebrain2/ardusub:                                        ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=16be9c4919a296a49f58cce7183045d9ecba85b1, not stripped
 ./binaries/Sub/stable/pxf/ardusub:                                               ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=f72c3e3f61278440adaf03af89362fa4f294880f, not stripped
pbarker@bluebottle:~/rc/tmp/buildlogs$ 

So the build ids match, for whatever that counts for.

@OXINARF OXINARF added the Tools label Sep 6, 2017
@peterbarker
Copy link
Contributor Author

I have pushed this into master.

@peterbarker peterbarker deleted the build_binaries.py branch October 25, 2017 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants